The present invention relates in general to image graphics and more particularly to a method and system for accelerating noise.
Graphics rendering and other visualization applications typically utilize accelerated hardware, firmware, and sometimes even software modules to perform compute-intensive rendering operations. These applications also utilize a graphics system interface such as OPENGL(copyright) or DIRECT3D(copyright) to control low-level graphics drawing operations in these accelerated modules. These operations include, but are not limited to, polygon specification and transformations, basic lighting control, and frame buffer operations such as blending and depth-buffering. Transformations usually correctly position one or more three-dimensional objects and then apply lighting and/or textures using the correct size and angles. OPENGL(copyright) utilizes a variety of low-level models such as textures, which may be defined for objects within scenes, and lighting models, which may define light sources and the manner in which surfaces in the scenes reflect light therefrom. Unfortunately, any increase in the quality of an object""s appearance is typically associated with a decrease in processing speed, which is undesirable, especially for interactive applications.
Programmable or procedural shading applications usually allow an artist or technical director to control appearances of objects by using complex effects such as blending, shading, and texturing. For example, the artist may introduce a noise function to give bricks or sand a visually pleasing appearance. However, most noise functions used in conventional systems are typically either of poor quality and/or are non-accelerated and extend processing time. For example, many conventional systems implement value noise functions, which typically introduce artifacts or other unnatural or non-random effects. These effects produce images of inferior quality, because they are visually displeasing to most viewers. Other systems may implement gradient noise functions, but these systems do not implement these noise functions in accelerated hardware, firmware and/or software modules. As a result, these systems suffer from a processing speed that is typically slower than those systems which are able to accelerate the noise functions. In addition, these noise functions are typically not compatible with graphics system interfaces such as OPENGL(copyright).
Furthermore, many of these accelerated modules are constrained to fixed point pixel values at one or more points in the image pipeline. For example, pixel data values during rasterization and in a frame buffer are typically restricted or clamped by a graphics system interface between zero and one. This compression of pixel values may reduce the accuracy to which light and/or color may be displayed and/or processed. This compression of values typically limits the accuracy and flexibility with which the appearances of objects, such as their texture, may be represented.
From the foregoing, it may be appreciated that a need has arisen for improving the speed at which noise may be introduced into graphics processing to produce visually pleasing images. In accordance with the present invention, a method and system for accelerating noise are provided that substantially reduce or eliminate disadvantages and problems of conventional systems.
One aspect of the invention is a method for accelerating noise. The method includes the step of creating a plurality of noise texture values that each correspond to a plurality of image pixel values. The method also includes invoking at least a portion of a graphics pipeline to blend the plurality of noise texture values with a plurality of image pixel values.
The invention provides several important advantages. Various embodiments of the invention may have none, some, or all of these advantages. The invention may accelerate various forms of noise functions including, but not limited to, band-limited and gradient noise. Such an advantage may improve the quality of the appearance of a scene and objects therein. For example, the invention may be used to control the introduction of noise into surface shading functions. The present invention allows OPENGL(copyright) to be used as a single-instruction multiple-data (SIMD) computing surface. Such an advantage may allow noise to be applied using procedural texturing, shading, and noise synthesis on a per-pixel basis using multiple passes through a graphics pipeline.
In addition, the invention may also allow control of system resource allocation. For example, the quality of procedural algorithms such as shaders may be traded off with the quality of noise used. Thus, resources may be allocated as desired by selection of shaders and/or noise functions. Furthermore, many forms of noise functions including, but not limited to, various dimensional inputs (e.g., one- to four-dimension), single value or color, and periodic noise functions, may be efficiently implemented using a variety of methods in conjunction with a graphics system interface such as OPENGL(copyright). The invention may be used with a variety of existing systems with little impact on the speed of processing. The invention may also allow such noise to be introduced procedurally, increasing the flexibility of the programmable environment.
The invention may also be used to implement higher resolution values for applying textured noise values to image pixels. The invention may also represent pixel values as an index to a texture value. Such an advantage allows more detailed textures to be applied to image data and avoids these texture values from being clamped in the acceleration modules. Such an advantage may also minimize any loss in the precision of computed texture values, improve the quality of the resultant images by improving the accuracy to which light and/or color may be displayed and/or processed.